package com.job.sun.HomeWork0707;

/**
 * @author 张春阳
 * @version 1.0
 * @since 2022-07-08 18:24:40
 */
public class Rapper {
    private String name;
    private int age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;

    }

    public void setAge(int age) {

        if(age<=15||age>=60){
            System.out.println("年龄不符合规定");
        }else{
            this.age = age;
        }
    }

    public Rapper() {
    }

    public Rapper(String name) {
        this.name = name;
    }

    public Rapper(String name, int age) {
        this.name = name;
        this.age = age;
    }
}